#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>
#include<string.h>

int main()
{
	char s1[20] = { 0 };
	char s2[20] = { 0 };

	scanf("%s", s1);
	strcpy(s2, s1);
	strcat(s2, s1);
	int ret = strcmp(s2, s1);
	printf("%s\n", s2);
	printf("%d\n", ret);

	return 0;
}